home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / Pdmod / modules / libraries / openurl.m < prev    next >
Encoding:
Text File  |  2002-10-28  |  4.0 KB  |  87 lines

  1. /*
  2. ** openurl.library - universal URL display and browser launcher library
  3. ** Written by Troels Walsted Hansen <troels@thule.no>
  4. ** Placed in the public domain.
  5. **
  6. ** Library definitions and structures.
  7. */
  8. /**************************************************************************/
  9.  
  10. MODULE  'dos'
  11. MODULE  'exec/lists'
  12. MODULE  'exec/nodes'
  13. MODULE  'utility/tagitem'
  14.  
  15. /**************************************************************************/
  16.  
  17. #define URL_Tagbase  TAG_USER
  18.  
  19. /* these tags are all you need to use openurl.library, the rest of the stuff 
  20.    in this include file is only of interest to prefs program writers.
  21. */
  22.  
  23. #define URL_Show           (URL_Tagbase + 1)    /* BOOL - show/uniconify browser */
  24. #define URL_BringToFront   (URL_Tagbase + 2)    /* BOOL - bring browser to front */
  25. #define URL_NewWindow      (URL_Tagbase + 3)    /* BOOL - open URL in new window */
  26. #define URL_Launch         (URL_Tagbase + 4)    /* BOOL - launch browser when not running */
  27. #define URL_PubScreenName  (URL_Tagbase + 5)    /* STRPTR - name of public screen to launch at */
  28.  
  29. /* this is Version 3 of this structure */
  30.  
  31. #define UPF_ISDEFAULTS   (1<<0) /* V2 - structure contains the default settings */
  32. #define UPF_PREPENDHTTP  (1<<1) /* V3 - prepend "http://" to URLs w/o scheme */
  33. #define UPF_DOMAILTO     (1<<2) /* V3 - mailto URLs get special treatment */
  34.  
  35. OBJECT URL_Prefs
  36.         Version:UBYTE,           /* always check this version number! */
  37.         BrowserList:MinList,     /* list of struct URL_BrowserNodes */
  38.         MailerList:MinList,      /* V3 - list of struct URL_MailerNodes */
  39.         Flags:ULONG,          /* V2 - flags, see above            */
  40.         DefShow:BOOL,            /* these BOOLs are the defaults for */
  41.         DefBringToFront:BOOL,    /* the similarly named tags         */
  42.         DefNewWindow:BOOL,       /* they are all new with Version 2  */
  43.         DefLaunch:BOOL
  44.  
  45. #define REXX_CMD_LEN  64
  46. #define UBNF_URLONCMDLINE  (1<<0)       /* if set, browser supports getting an URL on 
  47.                                     the commandline when launched. obsolete as
  48.                                     of V3 - use %u on commandline instead */
  49. #define UBN_NAME_LEN          32
  50. #define UBN_PATH_LEN          256   //FMSIZE
  51. #define UBN_PORT_LEN          32
  52. #define UBN_SHOWCMD_LEN       REXX_CMD_LEN
  53. #define UBN_TOFRONTCMD_LEN    REXX_CMD_LEN
  54. #define UBN_OPENURLCMD_LEN    REXX_CMD_LEN
  55. #define UBN_OPENURLWCMD_LEN   REXX_CMD_LEN
  56.  
  57. OBJECT URL_BrowserNode
  58.         Node:MinNode,
  59.         Flags:ULONG,                           /* flags, see above */
  60.         Name[UBN_NAME_LEN]:UBYTE,                  /* name of webbrowser */
  61.         Path[UBN_PATH_LEN]:UBYTE,                  /* complete path to browser */
  62.         Port[UBN_PORT_LEN]:UBYTE,                  /* webbrowser arexx port */
  63.         ShowCmd[UBN_SHOWCMD_LEN]:UBYTE,            /* command to show/uniconify browser */
  64.         ToFrontCmd[UBN_TOFRONTCMD_LEN]:UBYTE,      /* command to bring browser to front */
  65.         OpenURLCmd[UBN_OPENURLCMD_LEN]:UBYTE,      /* command to open url */
  66.         OpenURLWCmd[UBN_OPENURLWCMD_LEN]:UBYTE     /* command to open url in new window */
  67.  
  68. #define UMN_NAME_LEN          32
  69. #define UMN_PATH_LEN          256    //FMSIZE
  70. #define UMN_PORT_LEN          32
  71. #define UMN_SHOWCMD_LEN       REXX_CMD_LEN
  72. #define UMN_TOFRONTCMD_LEN    REXX_CMD_LEN
  73. #define UMN_WRITEMAILCMD_LEN  (REXX_CMD_LEN * 2)
  74.  
  75. OBJECT URL_MailerNode
  76.         Node:MinNode,
  77.         Flags:ULONG,                             /* flags, see above */
  78.         Name[UMN_NAME_LEN]:UBYTE,                    /* name of mailer */
  79.         Path[UMN_PATH_LEN]:UBYTE,                    /* complete path to mailer */
  80.         Port[UMN_PORT_LEN]:UBYTE,                    /* mailer arexx port */
  81.         ShowCmd[UMN_SHOWCMD_LEN]:UBYTE,              /* command to show/uniconify mailer */
  82.         ToFrontCmd[UMN_TOFRONTCMD_LEN]:UBYTE,        /* command to bring mailer to front */
  83.         WriteMailCmd[UMN_WRITEMAILCMD_LEN]:UBYTE     /* command to write mail */
  84.  
  85. /* LIBRARIES_OPENURL_H */
  86.  
  87.